Skip to main content
Primary Sales involves the use of a smart contract to facilitate the minting of ERC721/1155s to users. In general, we’d recommend using our audited primary sales contracts that are easily deployed from the Sequence Builder.

Primary Sales in Unity

When working with the Sequence sales contracts in Unity, it is recommended to use the ERC721Sale and ERC1155Sale classes when working with ERC721 and ERC1155 sales respectively. If you are using your own primary sales contract with its own ABI, it is recommended to build a C# contract wrapper (like we’ve done with ERC721Sale and ERC1155Sale) to facilitate an easier, less error-prone workflow. This doc will focus on the use of our Primary Sales contracts. Both classes are easily constructed:
Once you’ve configured your Primary Sale contract in the Sequence Builder, you may want to fetch those details in Unity.
Finally, in order to checkout, you’ll want to grant your sale contract appropriate spend permissions on your price currency and call the mint function on your sale contract (or if pricing in native token, provide the payment as your transaction ‘value’).
Don’t forget to add your primary sales contracts and price currency contract addresses to your Gas Tank if you want these transactions to be sponsored!